An Open and Shut Typecase (Extended Version)

نویسندگان

  • Dimitrios Vytiniotis
  • Geoffrey Washburn
  • Stephanie Weirich
چکیده

Ad-hoc polymorphism is a compelling addition to typed programming languages. There are two differentforms of ad-hoc polymorphism. With the nominal form, the execution of an operation is determined solely bythe name of the type argument, whereas with the structural form, operations are defined by case analysis onthe structure of types. The two forms differ in the way that they treat user-defined types. Operations definedby the nominal approach are considered "open"—the programmer can add cases for new types withoutmodifying existing code. The operations must be extended however with specialized code for the new types,and it may be tedious and even difficult to add extensions that apply to a potentially large universe of user-defined types. Structurally defined operations apply to new types by treating them as equal to their underlyingdefinitions, so no new cases for new types are necessary. However this form is considered "closed" toextension, as the behaviour of the operations cannot be differentiated for the new types. This form destroysthe distinctions that user-defined types are designed to express. Both approaches have their benefits, so it isimportant to provide both capabilities in a single language that is expressive enough to decouple the"openness" issue from the way that user-defined types are treated. We present such a language that supportsboth forms of ad-hoc polymorphism. CommentsUniversity of Pennsylvania Department of Computer and Information Science Technical Report No. MS-CIS-04-26. This technical report is available at ScholarlyCommons: http://repository.upenn.edu/cis_reports/27 An Open and Shut Typecase(Extended Version) Dimitrios Vytiniotis Geoffrey Washburn Stephanie WeirichTechnical Report MS-CIS-04-26Department of Computer and Information ScienceUniversity of Pennsylvania{dimitriv, geoffw, sweirich}@cis.upenn.edu

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The traditional Arabic typecase extended to the Unicode set of glyphs

Unicode, and other “universal” encodings have shown the need for adapting resources until now available only for major scripts, to the “ethnic” extensions of these scripts. In this paper we describe such an example: the adaptation of the traditional Arabic typecase to the needs of other languages using the Arabic script. We present an implementation of this extension : Al-Amal, based on TEX,MET...

متن کامل

Investigating the Impact of Dual Task Condition and Visual Manipulation on Healthy Young Old During Non-Dominant Leg Stance

Objectives: The dominant leg has always received special attention in public health practices and even in professional clinical evaluation and interventions. The aim of this research study was to methodically examine the substrate balance character of the non-dominant leg under dual task conditions and visual deprivation to increase the baseline insight for maintaining body balance and for fall...

متن کامل

Gating scheme for single GABA-activated Cl- channels determined from stability plots, dwell-time distributions, and adjacent-interval durations.

To study the gating of a GABA-activated Cl- channel, currents from single channels activated by 1.0 microM GABA were examined in patches of membrane excised from cultured chick cerebral neurons. The distributions of open and shut interval durations were each described by the sum of 3 exponential components, suggesting that the channel normally enters at least 3 open and 3 shut states. Five diff...

متن کامل

Power Supply and Current Modulation Circuits for Semiconductor Lasers

Design and construction of a stable current supply with protection circuits are described. The reported circuit provides a high-stable and high-level current variable from 0.5-1.2 A with the protect ion circuits to prevent over load current, voltage and off-range temperature operation. A detailed analysis of the circuit parameters is given and the time behaviors of the load voltage/current and ...

متن کامل

Study of the Effect of an Open Transverse Crack on the Vibratory Behavior of Rotors Using the h-p Version of the Finite Element Method

In this paper, we use the hybrid h-p version of the finite element method to study the effect of an open transverse crack on the vibratory behavior of rotors, the one-dimensional finite element Euler-Bernoulli beam is used for modeling the rotor, the shape functions used are the Hermite cubic functions coupled to the special Legendre polynomials of Rodrigues. The global matrices of the equation...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004